<?php
include_once '../library/config.php';
include_once '../library/popuphelper.php';
include_once '../model/stafflist.php';
$entity=new StaffList();
$entity->request();
$entity->request()->remove(array('id'));
if($entity['action'])
{
    PoPupHelper::iframereload();
    $entity->update()->where("myid=".$entity["id"])->submit();
    PoPupHelper::showSucceed();
}
$entity->select()->where("myid=".$entity["id"])->get_first_rows();
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <link href="/css/reset.css" rel="stylesheet" type="text/css" />
        <link href="/css/layout.css" rel="stylesheet" type="text/css" />
        <title>后台管理系统</title>
    </head>
    <body>
        <form method="post" class="labelright nomargin">
            <div class="mainwrapassist notitletoolbar">
                <table class="wp100 cellbor">
                    <tr>
                        <td class="tr w80">座机号：</td>
                        <td>
                            <input type="text" name="zuoji" maxlength="25" value="<?php echo $entity['zuoji'];?>" />
                        </td>
                    </tr>
                    <tr>
                        <td class="tr">企业邮箱：</td>
                        <td>
                            <input type="text" name="email" maxlength="25" value="<?php echo $entity['email'];?>" />
                        </td>
                    </tr>
                    <tr>
                        <td class="tr">部门：</td>
                        <td selectcascade="bumen" dict-name="bumenid" dict-val="<?php echo $entity['bumenid'];?>"></td>
                    </tr>
                    <tr>
                        <td class="tr">职务：</td>
                        <td selectcascade="gangwei" dict-name="gangweiid" dict-val="<?php echo $entity['gangweiid'];?>"></td>
                    </tr>
                </table>
            </div>
            <div id="statusbar">
                <input type="hidden" name="action" value="<?PHP echo $entity["id"]?"update":"append";?>" />
                <button type="submit" submitvalidate="#thisform"><?PHP echo $entity["id"]?"修改":"增加";?></button>
            </div>
        </form>
        <script src="/data/staff.js"></script>
        <?php include_once '../inc/js.html';?>
    </body>
</html>